<!DOCTYPE html>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
<title>New Order</title>
	<script type="text/javascript">
		function showValue(newValue)
		{
			document.getElementById("range").innerHTML=newValue;
		}
		
		function validateForm()
		{
			var y=document.forms["order_form"]["amount"].value
			if (y==null || y<=0)
			  {
				  alert("Bad amount entered!");
				  return false;
			  }
		}
	</script>
</head>
	<body>
		<h1>New Order</h1>
		<form name="order_form" action="http://chartservice.no-ip.org/ChartService/rest/kpi/add_order" method="post" onsubmit="return validateForm()">
			<fieldset>
				<label>Select Product: </label><br/><br/>
				<select name="product">
					<option value="hammer">Hammer</option>
					<option value="saw">Saw</option>
					<option value="scewdriver">Screwdriver</option>
				</select><br/><br/>
				<label for="amount">Select Amount: </label><span id="range">0</span>
				<p><input type="range" name="amount" min="0" max="20000" value="0" step="5" onchange="showValue(this.value)" /></p>
				<p><input type="submit"></p>
			</fieldset>
		</form>
		<h1>Ressources</h1>
		<ul>
			<li>
				<a href="http://chartservice.no-ip.org/ChartService/rest/kpi/get_sales_volume">Sales Volume</a>
			</li>
			<li>
				<a href="http://chartservice.no-ip.org/ChartService/rest/kpi/get_product_share">Product Share</a>
			</li>
		</ul>
	</body>
</html>